/**
 *====================================================
 * 文件名称: FinanceTallyDeliveryActionApi.java
 * 修订记录：
 * No    日期				作者(操作:具体内容)
 * 1.    2015年11月19日			chenxy(创建:创建文件)
 *====================================================
 * 类描述：(说明未实现或其它不应生成javadoc的内容)
 */
package com.yuexunit.finance.project.action.v1;

import java.math.BigDecimal;
import java.util.Date;

import com.yuexunit.finance.context.FinVersion1;
import com.yuexunit.finance.project.action.v1.model.input.ContainerTallyingSubmitAbnormalParams;
import com.yuexunit.finance.project.action.v1.model.input.ContainerTallyingSubmitParams;
import com.yuexunit.finance.project.action.v1.model.input.SignSyncParams;
import com.yuexunit.finance.project.action.v1.model.input.TallySyncParams;
import com.yuexunit.finance.project.action.v1.model.input.TallyingParams;
import com.yuexunit.finance.project.action.v1.model.input.TallyingUpdateParams;
import com.yuexunit.finance.project.action.v1.model.output.ContainerTallyingSubmitResponse;
import com.yuexunit.finance.project.action.v1.model.output.DeliveryDetail;
import com.yuexunit.finance.project.action.v1.model.output.DeliveryLineInfo;
import com.yuexunit.finance.project.action.v1.model.output.SupervisionConfirmationDetail;
import com.yuexunit.finance.project.action.v1.model.output.SyncTallyMessage;
import com.yuexunit.finance.project.action.v1.model.output.TallyingDetail;
import com.yuexunit.finance.project.action.v1.model.output.TallyingLineInfo;
import com.yuexunit.page.PageCriteria;
import com.yuexunit.page.PageList;
import com.yuexunit.web.annotation.Action;
import com.yuexunit.web.annotation.Parameter;
import com.yuexunit.web.annotation.Permission;

/**
 * @ClassName: FinanceTallyDeliveryActionApi
 * @Description: 理货配送任务
 * @author chenxy
 * @date 2015年11月19日 下午8:49:15
 */
public interface FinanceTallyDeliveryActionApi {

	@Permission
	@Action(version = FinVersion1.class, description = "下达理货任务(物流公司)")
	@Parameter(name = "tallyingId", description = "理货单ID")
	public String createTallying(TallyingParams tallyingParams);

	@Permission
	@Action(version = FinVersion1.class, description = "修改理货任务(物流公司)")
	public void updateTallying(TallyingUpdateParams tallyingUpdateParams);

	@Permission
	@Action(version = FinVersion1.class, description = "删除理货任务(物流公司)")
	public void deleteTallying(
			@Parameter(name = "tallyingId", description = "理货单号ID") Long tallyingId
	);

	@Permission
	@Action(version = FinVersion1.class, description = "接收理货任务(物流公司)")
	public void confirmTallying(
			@Parameter(name = "tallyingId", description = "理货单号ID") Long tallyingId
	);
	
	@Permission
	@Action(version = FinVersion1.class, description = "提交理货任务-单个集装箱理货提交(含异常上报)-上传附件形式")
	public void submitContainerTallyingByUploadfile(
			@Parameter(name = "recieveNoticeId", description = "收货通知ID") Long recieveNoticeId,
			@Parameter(name = "clerkId", description = "理货负责人ID") Long clerkId,
			@Parameter(name = "inventoryFile", description = "货箱信息 excel文件") String inventoryFile,
			@Parameter(name = "inventoryImage", description = "理货图片") String inventoryImage
	);
	
	@Action(version = FinVersion1.class, description = "提交理货任务-单个集装箱理货提交(含异常上报)-上传附件形式")
	public void test11(
			@Parameter(name = "fileName", description = "fileName") Long fileName
	);

	@Permission
	@Action(version = FinVersion1.class, description = "提交理货任务-单个集装箱理货提交(含异常上报)")
	public ContainerTallyingSubmitResponse submitContainerTallying(ContainerTallyingSubmitParams tallyingSubmitParams);

	@Permission
	@Action(version = FinVersion1.class, description = "补报理货货箱异常信息")
	public void supplementAbnormalContainerTallying(ContainerTallyingSubmitAbnormalParams params);

	@Permission
	@Action(version = FinVersion1.class, description = "补传理货货箱图片(物流公司)-上传材料后立即调用该接口")
	public void supplementTallyContainerInventory(
			@Parameter(name = "inventoryHistoryId", description = "集装箱ID") Long inventoryHistoryId,
			@Parameter(name = "tallyPreFile", description = "理货前图片", nullable = true) String tallyPreFile,
			@Parameter(name = "tallySuffixFile", description = "理货后图片", nullable = true) String tallySuffixFile
	);

	@Permission
	@Action(version = FinVersion1.class, description = "补传理货货物图片(物流公司)-上传材料后立即调用该接口")
	public void supplementTallyContainerBulkstock(
			@Parameter(name = "bulkstockHistoryId", description = "﻿箱货明细ID") Long bulkstockHistoryId,
			@Parameter(name = "filesUuid", description = "货物图片") String filesUuid
	);
	
	@Permission
	@Action(version = FinVersion1.class, description = "补传换箱信息的理货内容")
	public void supplementTallyExchangeContainerInventory(
			@Parameter(name = "containerId", description = "换箱信息ID") Long containerId,
			@Parameter(name = "clerkMobile", description = "理货人手机号") String clerkMobile,
			@Parameter(name = "tallyStartDateTime", description = "理货开始时间") Date tallyStartDateTime,
			@Parameter(name = "tallyDateTime", description = "理货时间") Date tallyDateTime,
			@Parameter(name = "tallyAddress", description = "理货地点") String tallyAddress,
			@Parameter(name = "tallyPreFile", description = "理货前图片") String tallyPreFile,
			@Parameter(name = "tallySuffixFile", description = "理货后图片") String tallySuffixFile,
			@Parameter(name = "tallyRemark", description = "理货说明", nullable = true) String tallyRemark,
			@Parameter(name = "tallyExAddress", description = "异常理货地点", nullable = true) String tallyExAddress,
			@Parameter(name = "tallyExRemark", description = "理货异常说明", nullable = true) String tallyExRemark,
			@Parameter(name = "tallyExAbnormalFile", description = "异常图片", nullable = true) String tallyExAbnormalFile,
			@Parameter(name = "tallyExAbnormalState", description = "理货异常类型 0:未知/1:货损/2:丢失", nullable = true) Integer tallyExAbnormalState,
			@Parameter(name = "caseSize", description = "箱型尺寸", nullable = true) String caseSize,
			@Parameter(name = "waybillNumber", description = "运单号", nullable = true) String waybillNumber,
			@Parameter(name = "facingSlip", description = "铅封号", nullable = true) String facingSlip,
			@Parameter(name = "quantity", description = "数量", nullable = true) BigDecimal quantity,
			@Parameter(name = "weight", description = "重量", nullable = true) BigDecimal weight,
			@Parameter(name = "volume", description = "体积", nullable = true) BigDecimal volume,
			@Parameter(name = "trayNumber", description = "铅封号", nullable = true) String trayNumber,
			@Parameter(name = "clerk", description = "理货员", nullable = true) String clerk
	);

	@Permission
	@Action(version = FinVersion1.class, description = "标记理货任务完成(物流公司)")
	public void finishedTallying(
			@Parameter(name = "tallyingId", description = "理货单号ID") Long tallyingId,
			@Parameter(name = "finishedFileUuid", description = "理货完成附件", nullable = true) String finishedFileUuid
	);

	@Permission
	@Action(version = FinVersion1.class, description = "上报理货任务(物流公司)")
	public void reportTallying(
			@Parameter(name = "tallyingId", description = "理货单号ID") Long tallyingId
	);

	@Permission
	@Action(version = FinVersion1.class, description = "理货收货确认(平台)")
	public void receiveConfirmTallying(
			@Parameter(name = "inventoryId", description = "货箱ID") Long[] inventoryIds,
			@Parameter(name = "receiveConfirmCreateTime", description = "确认收货时间", nullable = true) Date receiveConfirmCreateTime
	);

	@Permission
	@Action(version = FinVersion1.class, description = "理货收货监管确认(平台)")
	public void superviseTallying(
			@Parameter(name = "inventoryId", description = "货箱ID") Long[] inventoryIds,
			@Parameter(name = "superviseTallyingCreateTime", description = "确认监管时间", nullable = true) Date superviseTallyingCreateTime
	);

	@Permission
	@Action(version = FinVersion1.class, description = "获取理货任务明细(理货信息)")
	public TallyingDetail inquireTallyingDetail(
			@Parameter(name = "tallyingId", description = "理货单号ID") Long tallyingId
	);

	@Permission
	@Action(version = FinVersion1.class, description = "查询理货任务列表")
	public PageList<TallyingLineInfo> inquireTallyingPageList(
			@Parameter(name = "waybillNumber", description = "运单号", nullable = true) String waybillNumber,
			@Parameter(name = "caseNumber", description = "箱号", nullable = true) String caseNumber,
			@Parameter(name = "tallyingId", description = "﻿理货单ID", nullable = true) Long[] tallyingId,
			@Parameter(name = "financeId", description = "﻿融资信息ID", nullable = true) Long financeId,
			@Parameter(name = "recieveNoticeId", description = "收货通知ID", nullable = true) Long recieveNoticeId,
			@Parameter(name = "logisticsCompanyId", description = "﻿物流公司ID", nullable = true) Long logisticsCompanyId,
			@Parameter(name = "tallyingNumber", description = "理货单号(提单号)", nullable = true) String tallyingNumber,
			@Parameter(name = "clerkId", description = "﻿物流公司人员ID", nullable = true) Long clerkId,
			@Parameter(name = "tallyingState", description = "理货状态 0:未知/1:待理货/2:不接受(拒绝)/3:理货中(已接受)/4:已完成", nullable = true) Integer[] tallyingState,
			@Parameter(name = "page", description = "分页参数") PageCriteria page
	);

	@Permission
	@Action(version = FinVersion1.class, description = "查询理货员任务列表(APP)")
	public PageList<TallyingLineInfo> inquireClerkTallyingPageList(
			@Parameter(name = "tallyingState", description = "理货状态 0:未知/1:待理货/2:未接受/3:理货中(已接受)/4:已完成/5:已上报", nullable = true) Integer[] tallyingState,
			@Parameter(name = "sort", description = "排序", nullable = true) Boolean sort,
			@Parameter(name = "page", description = "分页参数") PageCriteria page
	);

	@Permission
	@Action(version = FinVersion1.class, description = "查询监管确认书")
	public SupervisionConfirmationDetail inquireSupervisionConfirmationDetail(
			@Parameter(name = "confirmationId", description = "监管确认ID") Long confirmationId
	);

	// ============================================================================================================================================================//
	@Permission
	@Action(version = FinVersion1.class, description = "生成放货配送单")
	@Parameter(name = "deliveryId", description = "放货配送单ID")
	public String createDelivery(
			@Parameter(name = "deliveryNoticeId", description = "放货通知单ID") Long deliveryNoticeId,
			@Parameter(name = "clerkId", description = "配送负责人ID") Long clerkId,
			@Parameter(name = "clerkName", description = "配送负责人") String clerkName,
			@Parameter(name = "clerkMobile", description = "配送负责人手机号") String clerkMobile,
			@Parameter(name = "inventoryIds", description = "货箱ID") Long[] inventoryIds
	);

	@Permission
	@Action(version = FinVersion1.class, description = "修改放货配送单")
	public void updateDelivery(
			@Parameter(name = "deliveryId", description = "放货配送单ID") Long deliveryId,
			@Parameter(name = "clerkId", description = "配送负责人ID") Long clerkId,
			@Parameter(name = "clerkName", description = "配送负责人") String clerkName,
			@Parameter(name = "clerkMobile", description = "配送负责人手机号") String clerkMobile,
			@Parameter(name = "inventoryIds", description = "货箱ID") Long[] inventoryIds
	);

	@Permission
	@Action(version = FinVersion1.class, description = "接收配送任务(物流公司)")
	public void confirmDelivery(
			@Parameter(name = "deliveryId", description = "放货配送单ID") Long deliveryId
	);

	@Permission
	@Action(version = FinVersion1.class, description = "拒绝配送任务(物流公司)")
	public void rejectDelivery(
			@Parameter(name = "deliveryId", description = "放货配送单ID") Long deliveryId
	);

	@Permission
	@Action(version = FinVersion1.class, description = "货箱签收")
	public void signContainerInventory(
			@Parameter(name = "inventoryId", description = "货箱ID") Long inventoryId,
			@Parameter(name = "signRemark", description = "签收说明") String signRemark,
			@Parameter(name = "signAddress", description = "签收地点") String signAddress,
			@Parameter(name = "signLongitude", description = "签收经度", nullable = true) BigDecimal signLongitude,
			@Parameter(name = "signLatitude", description = "签收纬度", nullable = true) BigDecimal signLatitude,
			@Parameter(name = "signPreFile", description = "签收前图片") String signPreFile,
			@Parameter(name = "signSuffixFile", description = "签收后图片") String signSuffixFile
	);
	
	@Action(version = FinVersion1.class, description = "货箱签收")
	public void syncOutboundNotifyInfo(
			@Parameter(name = "caseNumber", description = "箱号") String caseNumer,
			@Parameter(name = "fileNameArray", description = "出库照片") String fileNameArray,
			@Parameter(name = "operator", description = "操作人") String operator,
			@Parameter(name = "soundRecord", description = "录音文件", nullable = true) String soundRecord,
			@Parameter(name = "remark", description = "说明", nullable = true) String remark
	);

	@Permission
	@Action(version = FinVersion1.class, description = "货箱签收")
	public void signAbnormalContainerInventory(
			@Parameter(name = "inventoryId", description = "货箱ID") Long inventoryId,
			@Parameter(name = "signRemark", description = "签收说明") String signRemark,
			@Parameter(name = "signAddress", description = "签收地点") String signAddress,
			@Parameter(name = "signLongitude", description = "签收经度", nullable = true) BigDecimal signLongitude,
			@Parameter(name = "signLatitude", description = "签收纬度", nullable = true) BigDecimal signLatitude,
			@Parameter(name = "signPreFile", description = "签收前图片") String signPreFile,
			@Parameter(name = "signSuffixFile", description = "签收后图片") String signSuffixFile,
			@Parameter(name = "abnormalState", description = "集装箱信息-异常类别 0:未知/1:货损/2:丢失") Integer abnormalState,
			@Parameter(name = "signSoundRecorde", description = "异常录音文件") String signSoundRecorde,
			@Parameter(name = "signAbnormalFile", description = "异常图片") String signAbnormalFile
	);

	@Permission
	@Action(version = FinVersion1.class, description = "获取放货配送明细(配送信息)")
	public DeliveryDetail inquireDeliveryDetail(
			@Parameter(name = "deliveryId", description = "放货通知ID") Long deliveryId
	);

	@Permission
	@Action(version = FinVersion1.class, description = "根据条件获取放货配送明细(配送信息)")
	public DeliveryDetail inquireDeliveryDetailByCondition(
			@Parameter(name = "deliveryId", description = "放货通知ID") Long deliveryId,
			@Parameter(name = "caseNumber", description = "货物箱号", nullable = true) String caseNumber,
			@Parameter(name = "waybillNumber", description = "物流运单号", nullable = true) String waybillNumber
	);

	@Permission
	@Action(version = FinVersion1.class, description = "查询放货配送列表")
	public PageList<DeliveryLineInfo> inquireDeliveryPageList(
			@Parameter(name = "deliveryId", description = "放货配送单ID", nullable = true) Long[] deliveryIds,
			@Parameter(name = "financeId", description = "﻿融资信息ID", nullable = true) Long financeId,
			@Parameter(name = "financeNumber", description = "﻿融资编号", nullable = true) String financeNumber,
			@Parameter(name = "deliveryNoticeId", description = "放货通知单ID", nullable = true) Long deliveryNoticeId,
			@Parameter(name = "logisticsCompanyId", description = "﻿物流公司ID", nullable = true) Long logisticsCompanyId,
			@Parameter(name = "clerkId", description = "﻿配送负责人ID", nullable = true) Long clerkId,
			@Parameter(name = "page", description = "分页参数") PageCriteria page
	);

	// ============================================================================================================================================================//
	@Permission
	@Action(version = FinVersion1.class, description = "货箱监管解除")
	@Parameter(name = "endall", description = "是否全部监管解除")
	public boolean createSupervisionRelieve(
			@Parameter(name = "inventoryId", description = "货箱ID") Long inventoryId,
			@Parameter(name = "relieveRemark", description = "解除监管说明") String relieveRemark
	);

	@Action(version = FinVersion1.class, description = "理货信息同步参数")
	public TallySyncParams syncTallyResult();

	@Action(version = FinVersion1.class, description = "理货信息同步")
	public SyncTallyMessage syncTally(
			@Parameter(name = "tallyjson", description = "理货信息") String tallyjson,
			@Parameter(name = "sign", description = "理货信息签名") String sign
	);
	
	@Action(version = FinVersion1.class, description = "理货信息同步")
	public void syncLocalTallyContainer(
			@Parameter(name = "inventoryHistoryId", description = "集装箱ID") Long inventoryHistoryId,
			@Parameter(name = "waybillNumber", description = "物流运单号") String waybillNumber,
			@Parameter(name = "caseNumber", description = "箱号") String caseNumber
	);

	@Action(version = FinVersion1.class, description = "签收信息同步参数")
	public SignSyncParams syncContainerSignResult();

	@Action(version = FinVersion1.class, description = "签收信息同步")
	public SyncTallyMessage syncContainerSign(
			@Parameter(name = "signjson", description = "签收信息") String signjson,
			@Parameter(name = "sign", description = "签收信息签名") String sign
	);

	//======================================================================================================
	@Action(version = FinVersion1.class, description = "从仓储系统获取舱单信息")
	public void reportBulkstockInfoFromWareHouse(
			@Parameter(name = "warehouseId", description = "仓库ID") String warehouseId,
			@Parameter(name = "warehouseName", description = "仓库名", nullable = true) String warehouse,
			@Parameter(name = "cabinNumber", description = "舱单号") String cabinNumber,
			@Parameter(name = "financeId", description = "融资ID") Long financeId,
			@Parameter(name = "bulkstockInfoIds", description = "大宗商品ID") Long[] bulkstockInfoIds,
			@Parameter(name = "quantities", description = "货物数量") BigDecimal[] quantities,
			@Parameter(name = "volumes", description = "货物体积") BigDecimal[] volumes,
			@Parameter(name = "weights", description = "重量") BigDecimal[] weights,
			@Parameter(name = "imageNames", description = "货物图片名 多张图片用逗号分隔") String[] imageNames,
			@Parameter(name = "receiptId", description = "仓单ID") String receiptId,
			@Parameter(name = "storageLocation", description = "库位", nullable = true) String[] storageLocation,
			@Parameter(name = "trayNumbers", description = "托盘号") String[] trayNumber,
			@Parameter(name = "facingSlip", description = "铅封号", nullable = true) String facingSlip,
			@Parameter(name = "facingSlipNext", description = "铅封号2", nullable = true) String facingSlipNext
	);

}
